﻿using System.Collections.Generic;
using WeiboWPSdk.Json;

namespace WeiboWPSdk.ResponseEntity {
    /// <summary>
    /// 评论
    /// </summary>
    public class Comment : EntityBase {
        /// <summary>
        /// 评论创建时间
        /// </summary>
        [JsonProperty(PropertyName = "created_at")]
        public string CreatedAt { get; internal set; }
        /// <summary>
        /// 评论的ID
        /// </summary>
        [JsonProperty(PropertyName = "id")]
        public long Id { get; internal set; }
        /// <summary>
        /// 评论的内容
        /// </summary>
        [JsonProperty(PropertyName = "text")]
        public string Text { get; internal set; }
        /// <summary>
        /// 评论的来源
        /// </summary>
        [JsonProperty(PropertyName = "source")]
        public string Source { get; internal set; }
        /// <summary>
        /// 评论作者的用户信息字段
        /// </summary>
        [JsonProperty(PropertyName = "user")]
        public User User { get; internal set; }
        /// <summary>
        /// 评论的MID
        /// </summary>
        [JsonProperty(PropertyName = "mid")]
        public string MID { get; internal set; }
        /// <summary>
        /// 字符串型的评论ID
        /// </summary>
        [JsonProperty("idstr")]
        public string IdStr { get; internal set; }
        /// <summary>
        /// 评论的微博信息字段
        /// </summary>
        [JsonProperty(PropertyName = "status")]
        public Status Status { get; internal set; }
        /// <summary>
        /// 评论来源评论，当本评论属于对另一评论的回复时返回此字段
        /// </summary>
        [JsonProperty(PropertyName = "reply_comment")]
        public Comment ReplyComment { get; internal set; }
    }

    public class CommentCollection : EntityBase {
        [JsonProperty("comments")]
        public IEnumerable<Comment> Comments { get; internal set; }
        //[JsonProperty("marks")]
        //public IEnumerable<object> Marks { get; internal set; }
        [JsonProperty("hasvisible")]
        public bool HasVisible { get; internal set; }
        //[JsonProperty("previous_cursor")]
        //public int PreviousCursor { get; internal set; }
        //[JsonProperty("next_cursor")]
        //public int NextCursor { get; internal set; }
        [JsonProperty("total_number")]
        public int TotalNumber { get; internal set; }
    }
}
